home *** CD-ROM | disk | FTP | other *** search
- package symantec.itools.awt;
-
- import java.awt.Component;
- import java.awt.Container;
- import java.awt.Event;
- import java.awt.LayoutManager;
- import java.awt.Panel;
-
- public class SpinButtonPanel extends Panel {
- protected DirectionButton incButton;
- protected DirectionButton decButton;
-
- public SpinButtonPanel() {
- ((Container)this).add(this.incButton = new DirectionButton(2));
- ((Container)this).add(this.decButton = new DirectionButton(3));
- }
-
- public void setNotifyWhilePressed(boolean var1) {
- this.incButton.setNotifyWhilePressed(var1);
- this.decButton.setNotifyWhilePressed(var1);
- }
-
- public boolean getNotifyWhilePressed() {
- return this.incButton.getNotifyWhilePressed();
- }
-
- public void setDelay(int var1) {
- this.incButton.setNotifyDelay(var1);
- this.decButton.setNotifyDelay(var1);
- }
-
- public int getDelay() {
- return this.incButton.getNotifyDelay();
- }
-
- public boolean action(Event var1, Object var2) {
- if (var1.target == this.incButton) {
- ((Component)this).postEvent(new Event(this, 603, (Object)null));
- return true;
- } else if (var1.target == this.decButton) {
- ((Component)this).postEvent(new Event(this, 604, (Object)null));
- return true;
- } else {
- return false;
- }
- }
-
- public synchronized void enable() {
- this.incButton.enable();
- this.decButton.enable();
- }
-
- public synchronized void disable() {
- this.incButton.disable();
- this.decButton.disable();
- }
-
- public synchronized void enableUpButton() {
- this.incButton.enable();
- }
-
- public synchronized void enableDownButton() {
- this.decButton.enable();
- }
-
- public synchronized void disableUpButton() {
- this.incButton.disable();
- }
-
- public synchronized void disableDownButton() {
- this.decButton.disable();
- }
-
- public void setLayout(LayoutManager var1) {
- }
- }
-